<?php if (!defined('BASEPATH'))exit('No direct script access allowed');
/**
 * 二维码生成器控制器
 */
class Trcode extends MY_Controller {

    function __construct() {
        parent::__construct();
        require_once(APPPATH.'libraries/phpqrcode/phpqrcode.php');
    }
    
    function index(){
        $text = trim($_GET['text']);
        $level = trim($_GET['level']);// 纠错级别：L、M、Q、H
        $width = trim($_GET['size']);// 图片宽度
        QRcode::png($text,false,$level,4);
    }
}
